﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Proggy.Web.Cms.Core.Models;

namespace Proggy.Sandbox.TestingAddedUrlAndImageUrlMatching
{
    class Program
    {
        static void Main(string[] args)
        {
            // 
            var input = AddedUrl.ProggyLinkPrefix + "012394039";
            var wrongput = AddedUrl.ProggyLinkPrefix + "_012394039";

            //
            var isMatch = AddedUrl.IsProggyLink(input);
            var iswrongMatch = AddedUrl.IsProggyLink(wrongput);

            //
            Console.WriteLine(input + " is match? " + isMatch);
            Console.WriteLine(wrongput + " is match? " + iswrongMatch);


            // 
            var id = AddedUrl.GetNodeIdFromProggyLink(input);

            //
            Console.WriteLine("Id for {0} = {1}", input, id);

            //
            var mailto = "mailto:robjohnson@gmail.com?subject=aa%20sso%20ss";
            var mailto2 = "mailto:robjohnson@gmail.com";

            Console.WriteLine("For {0} \n\nIS MAILTO? {3} \n\nADDRESS = {1} \n\nSUBJECT = {2}", mailto, AddedUrl.GetMailToAddress(mailto), AddedUrl.GetMailToSubject(mailto), AddedUrl.IsMailtoLink(mailto));
            Console.WriteLine("For {0} \n\nIS MAILTO? {3} \n\nADDRESS = {1} \n\nSUBJECT = {2}", mailto, AddedUrl.GetMailToAddress(mailto2), AddedUrl.GetMailToSubject(mailto2), AddedUrl.IsMailtoLink(mailto2));


            //
            Console.ReadKey();

            
        }
    }
}
